package com.analytical.www.pop

import android.content.Context
import android.view.WindowManager
import android.widget.PopupWindow
import com.analytical.www.R

/**
 * @author shawn
 * @since 2023/5/18
 */
open class PopBase(val context: Context) : PopupWindow(context) {

    var onDismissListener:IOnDismissListener? = null

    init {
        isClippingEnabled = false
        animationStyle = R.style.anim_popupWindow
        width = WindowManager.LayoutParams.MATCH_PARENT
        height = WindowManager.LayoutParams.MATCH_PARENT
    }

    override fun dismiss() {
        super.dismiss()
        onDismissListener?.onPopDismiss()
    }

    interface IOnDismissListener{
        fun onPopDismiss()
    }

}